package com.springcloud.demo.eurekaclient.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouyang
 * @Description
 * @date 2018/08/07
 */
@RequestMapping("/test")
@RestController
public class TestController {

    @Value("${server.port}")
    String port;

    @GetMapping("hello")
    public String hello(String name){
        return "hello, "+ name + " by: "+ port;
    }

}
